package main.java.indi.zyj.sword;

import main.java.indi.zyj.hot100.base.ListNode;

public class TrainingPlan2 {

    public ListNode trainingPlan(ListNode head, int cnt) {

        ListNode p = head, pre = head;

        for (int i = 0; i < cnt - 1; i++) {
            p = p.next;
        }

        while (p.next != null) {
            p = p.next;
            pre = pre.next;
        }


        return pre;


    }

}
